﻿<%@ Page Language="C#" EnableEventValidation="false" MasterPageFile="~/RightFrame.Master" AutoEventWireup="true" CodeBehind="DepartSchedule.aspx.cs" Inherits="MyOA.UI.ScheduleManage.DepartSchedule.DepartSchedule" Title="无标题页" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphTitle" runat="server">
 你的位置：部门日程
    <script type="text/javascript">
        var branch,depart;
        var Alert=ymPrompt.alert;
        var Error=ymPrompt.errorInfo;
        function btnClick()
        {
           
            branch=document.getElementById("<%=ddlBranch.ClientID %>");
            depart=document.getElementById("<%=ddlDepart.ClientID %>");
            if(branch.selectedIndex==0)
            {
               Error("请选择机构",null,null,"温馨提示",branchFocus);
               return false; 
            }
            if(depart.selectedIndex==0)
            {
               Error("请选择部门",null,null,"温馨提示",departFocus);
               return false; 
            }
            
            return true;
        }
        function branchFocus()
        {
            branch.focus();
        }
        function departFocus()
        {
            depart.focus();
        }
    </script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContnent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
     <div class="body_title">部&nbsp;&nbsp;门&nbsp;&nbsp;日&nbsp;&nbsp;程</div>
     <div class="body_content">
        <div>
           <span class="span1">
                机构：<asp:DropDownList ID="ddlBranch" runat="server" Width="150px" CssClass="inputText2"></asp:DropDownList>
               <cc1:CascadingDropDown ID="CascadingDropDown1" runat="server"
                ServicePath="DepartScheduleService.asmx" ServiceMethod="getBranch" TargetControlID="ddlBranch" Category="BranchInfo"
                PromptText="请选择机构" LoadingText="正在加载。。。" >
               </cc1:CascadingDropDown>
            </span>
            
            <span class="span1">
                部门：<asp:DropDownList ID="ddlDepart" runat="server" Width="100px" 
                CssClass="inputText2" ></asp:DropDownList>
                      <cc1:CascadingDropDown ID="CascadingDropDown2" runat="server"
                ServicePath="DepartScheduleService.asmx" ServiceMethod="getDepart" TargetControlID="ddlDepart" Category="DepartInfo" ParentControlID="ddlBranch"
                PromptText="请选择部门" LoadingText="正在加载。。。"  >
               </cc1:CascadingDropDown>
            </span>
            
            <span class="span1">
                姓名：<asp:TextBox ID="txtLoginId" runat="server" Width="50px" CssClass="inputText2"></asp:TextBox>
                  <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
                 ServicePath="DepartScheduleService.asmx" ServiceMethod="keyWord" TargetControlID="txtLoginId" MinimumPrefixLength="1" CompletionSetCount="5"
                  CompletionListCssClass="completionListElement" 
            CompletionListItemCssClass="listItem" 
            CompletionListHighlightedItemCssClass="highlightedListItem">
                </cc1:AutoCompleteExtender>
            </span>
            
            <span class="span1">
                日期：<asp:TextBox ID="txtDate" runat="server" Width="100px" onfocus="this.value='';new WdatePicker(this,'%Y-%M-%D',true,'whyGreen')" CssClass="textbox inputText2"></asp:TextBox>
              
            </span>
            
            <span  class="span1">
                <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="btn" 
                onMouseOver="document.getElementById(this.id).className='btnOver'" onMouseOut="document.getElementById(this.id).className='btnOut'"
                  onclick="btnSearch_Click" OnClientClick="return btnClick()"/>
            </span>
        </div>
        
        <div style="margin-top:40px;"><hr /></div>
        <div class="body_title" style="font-size:14px; margin-top:-15px;">搜索结果</div>
        <div style="text-align:center; margin-top:30px;">
           <div id="divSchedule" runat="server">
           <table cellpadding="0" cellspacing="1" bgcolor="#CECECE">
            <asp:Repeater ID="rpSchedule" runat="server">
                <HeaderTemplate>
                <tr style="margin:0px">
                    <td height="26" background="../../images/tab_14.gif" >标题</td>
                    <td  background="../../images/tab_14.gif" >地址</td>
                    <td background="../../images/tab_14.gif" >开始时间</td>
                    <td  background="../../images/tab_14.gif" >结束时间</td>
                    <td  background="../../images/tab_14.gif" >创建时间</td>
                    <td  background="../../images/tab_14.gif" >详细</td>
              
                </tr>
            </HeaderTemplate>
            
            <ItemTemplate>
                  <tr onmousemove="this.style.backgroundColor='white';this.style.cursor='hand'" onmouseout="this.style.backgroundColor='#66CCFF'" bgcolor="#66CCFF" height="26">
                    <td width="16%"><%#Eval("title") %></td>
                    <td width="20%"><%#Eval("address") %></td>
                    <td width="16%"><%#Eval("begintime") %></td>
                    <td width="16%"><%#Eval("endtime") %></td>
                    <td width="16%"><%#Eval("createtime") %></td>
                    <td width="16%"><a href='<%#"../PersonSchedule/SaveMySchedule.aspx?scheduleId="+Eval("scheduleid") %>'>详细</a></td>
                    
                </tr>
            </ItemTemplate>
            </asp:Repeater>
         
            </table>
               <webdiyer:AspNetPager ID="aspDepartSchedule" runat="server"
      PageSize="5"  PagingButtonSpacing="10px"
                        PageIndexBoxType="DropDownList" 
        ShowNavigationToolTip="True" CssClass="paginator"
                         CurrentPageButtonClass="cpb" ShowPageIndexBox="Always" 
        onpagechanged="aspDepartSchedule_PageChanged">
    </webdiyer:AspNetPager>
           </div>
            
        </div>
     </div>
     </ContentTemplate>
    </asp:UpdatePanel>
    
       
</asp:Content>
